﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RegiseterPage.aspx.cs"
    Inherits="PerssionCenterServices.Account.RegiseterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>南湖外卖 - 用户注册</title>
    
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/app.js" type="text/javascript"></script>
    <link href="../Styles/app.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    
     .registerMsg
     {
         width:200px;
         font-size:14px;
         
         }
     
    </style>
</head>
<body>
    <form id="form1" runat="server" style="text-align: center;">
    <asp:ScriptManager  ID="scriptmanager" runat="server" />
    <div class="pageHead">
        
        <div class="mainMenu_div_splitline">
           
        </div>
    </div>
    <div class="pageContent">
    <table id="tbRegister" runat="server"  align="center" style ="text-align:left;margin-top:100px" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td class="fieldtitle">
                <div><span style="color:Red">*</span>登录名(邮箱)</div>
            </td>
            <td>
                <input id="txtLogonName" runat="server" class="txt_input" onblur="checkname();" />
            </td>
            <td  class="registerMsg"><span id="msgContainerCheckName"></span><span id="spanNameCheckMsg"></span></td>
        </tr>
        <tr>
            <td class="fieldtitle">
                <div><span style="color:Red">*</span>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</div>
            </td>
            <td>
                <input id="txtPassword" runat="server" type="password" class="txt_input" onblur="checkpassword();"/>
            </td>
            <td class="registerMsg"><span id="spanPasswordCheckMsg"></span></td>
        </tr>
        <tr>
            <td class="fieldtitle">
                <div><span style="color:Red">*</span>重复密码</div>
            </td>
            <td>
                <input id="txtPasswordRep" runat="server" type="password" class="txt_input" onblur="checkpassword1();"/>
            </td>
            <td  class="registerMsg"><span id="spanPasswordCheckMsg1"></span></td>
        </tr>
        <tr>
            <td class="fieldtitle">
                <div><span style="color:Red">*</span>昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称</div>
            </td>
            <td>
                <input id="txtNickName" runat="server" class="txt_input" onblur="checknickname();"/>
            </td>
            
        </tr>
        <tr>
            <td class="fieldtitle">
                <div><span style="color:Red">*</span>手机号码</div>
            </td>
            <td>
                <input id="txtPhone" runat="server" class="txt_input" onblur="checphone();"/>
            </td>
            
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Button ID="btnOK" runat="server" Text="  注  册  " OnClick="RegisterClick" class="btn" />
                 
            </td>
        </tr>
        <tr><td></td><td> </td></tr>
    </table>
   
     </div>
    <div class="pageFooter">
        <p>
            <a href="#">关于南湖外卖</a> <a href="#">加入我们</a><a href="#">联系我们</a><a href="#">帮助</a></p>
            <p>© 2012-2013 南湖外卖 京ICP备13031298号  京公网安备11010802012179</p>

    </div>
    
    <script type="text/javascript">
        $(document).ready(function () {
            //spanNameCheckMsg.innerHTML = "<img id='waiteImg1' style='display:block;width:17px;height:17px' src='../images/18.gif'/>";

        });
        JSBase.AjaxSetup();
        function checkname() {
            if (!$("#txtLogonName").val()) {
                spanNameCheckMsg.innerText = "请填写用户名!";
                return; 
            }
            var callHandler = "CheckUserNameHandler.ChectUserIsExists";
            var data = { "action": callHandler, "data": $("#txtLogonName").val() };
            spanNameCheckMsg.innerText = "";
            $.ajax(
                {
                    data: data,
                    success: function (responseJson) {
                        if (!responseJson.Result) {
                            spanNameCheckMsg.innerText = "用户名可用!";
                            spanNameCheckMsg.style.color = "Green";
                        }
                        else {
                            spanNameCheckMsg.innerHTML = "用户名已经存在!";
                            spanNameCheckMsg.style.color = "Red";
                        }
                    },
                    msgContainer: document.getElementById("msgContainerCheckName")
                });
            };
        function checkpassword() {
            var name = $("#txtLogonName").val();
            
        }
        function checkpassword1() {
            if ($("#txtPassword").val() !== $("#txtPasswordRep").val()) {
                spanPasswordCheckMsg1.innerHTML = "两次密码不一致!";
            }
            else {
                spanPasswordCheckMsg1.innerHTML = "";
            }
        }
        function checknickname() {
            var nickname = $("#txtNickName").val();
            nickname.len
        }
        function checphone()
        { }


    </script>
    </form><div id="divShoppingCart" class="divCart" >
    </div>
</body>
</html>
